<p>Calling <code>toString()</code> or <code>clone()</code> on an object should always return a string or an object. Returning <code>null</code>
instead contravenes the method's implicit contract.</p>
<h2>Noncompliant Code Example</h2>
<pre>
public String toString () {
  if (this.collection.isEmpty()) {
    return null; // Noncompliant
  } else {
    // ...
</pre>
<h2>Compliant Solution</h2>
<pre>
public String toString () {
  if (this.collection.isEmpty()) {
    return "";
  } else {
    // ...
</pre>
<h2>See</h2>
<ul>
  <li> <a href="http://cwe.mitre.org/data/definitions/476.html">MITRE CWE-476</a> - NULL Pointer Dereference </li>
  <li> <a href="https://www.securecoding.cert.org/confluence/x/ZwDOAQ">CERT, EXP01-J.</a> - Do not use a null in a case where an object is required
  </li>
</ul>

